package com.fz.service;

import com.fz.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fz.vo.LoginVO;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.math.BigDecimal;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * <p>
 * 存储系统用户信息 服务类
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
public interface UserService extends IService<User> {
    User login(String phone, String password);

    Boolean check(Long id, String field, String value);

    Boolean update(Long id, String username, String nickyName, Integer gender, Integer age,String phone, String email, MultipartFile file) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;

    Boolean sendVerificationCode(String email);

    Boolean verifyCode(String email, String code);

    Boolean resetPassword(String email, String password);

    Boolean setProperty(Long id, String field, String value);

    List<User> getList();

    boolean del(long id,boolean status);

    String getUsernameById(Long id);

    User getById1(Long id);

    Boolean transfer(Long id, String tophone, BigDecimal transferAmount);

    Boolean recharge(Long id, BigDecimal rechargeAmount);

    Boolean payCheck(Long id, String password,BigDecimal paymoney);
    // Boolean payif(Long id, BigDecimal rechargeAmount);


    LoginVO Buslogin(String phone, String password);
}
